<template>
  <pageTabelLayout>
    <template #pageHeader>
      <div class="search-form divClass" v-if="headerShow">
        <div>
          <a-form :model="queryData" size="small" layout="inline">
            <a-form-item label="流转卡号" :style="{ width: '270px' }" label-col-flex="70px">
              <a-input allow-clear class="bacClass" placeholder="请扫流转卡号二维码" v-model="pageData.circulatCard"
                ref="getFocus1" @press-enter="huiche" @change="changeLz(pageData.circulatCard)" />
            </a-form-item>
            <a-form-item label="记录单号" :style="{ width: '270px' }" label-col-flex="70px">
              <a-date-picker  popup-container="html"  allow-clear class="bacClass" placeholder="" v-model="pageData.recordCode"
                @press-enter="huiche" />
            </a-form-item>
            <a-form-item label="开单日期" :style="{ width: '270px' }" label-col-flex="70px">
              <a-input allow-clear class="bacClass" placeholder="" v-model="pageData.recordDate" @press-enter="huiche" />
            </a-form-item>
            <a-form-item label="布号" :style="{ width: '270px' }" label-col-flex="70px">
              <a-input allow-clear class="bacClass" placeholder="" v-model="pageData.clothCode" @press-enter="huiche" />
            </a-form-item>
            <a-form-item label="客户名称" :style="{ width: '270px' }" label-col-flex="70px">
              <a-input allow-clear class="bacClass" placeholder="" v-model="pageData.customName" @press-enter="huiche" />
            </a-form-item>
            <a-form-item label="计划单号" :style="{ width: '270px' }" label-col-flex="70px">
              <a-input allow-clear class="bacClass" placeholder="" v-model="pageData.planCode" @press-enter="huiche" />
            </a-form-item>
            <a-form-item label="品名" :style="{ width: '270px' }" label-col-flex="70px">
              <a-input allow-clear class="bacClass" placeholder="" v-model="pageData.brandName" @press-enter="huiche" />
            </a-form-item>
          </a-form>
        </div>
      </div>
      <div class="my-divisders">
        <a-divider orientation="center">
          <icon-double-up v-if="headerShow" @click="headerShow = false" :strokeWidth="2" :size="18" />
          <icon-double-down v-else @click="headerShow = true" :strokeWidth="2" :size="18" />
        </a-divider>
      </div>
      <div class="my-tool-bar">
        <Toolbar :style="{ width: '300px' }" :items="['查询', '新增', '导出', '打印', '删除']" @select="cx" @add="addTz"
          @dyBoufei="printTz" @export="exportExcel" @del="delTz">
        </Toolbar>
      </div>
    </template>
    <template #pageTabel>
      <AgGridVuesCopys :rowHeight="33" :headerHeight="33" :suppressCopyRowsToClipboard="true" :localeText="localeText1"
        rowSelection="multiple" @grid-ready="gridReady" style="height: 100%" :defaultColDef="defaultColDef"
        class="ag-theme-alpine" :rowData="table.dataList" :columnDefs="tc">
      </AgGridVuesCopys>
    </template>
    <paginationCopys :total="total" show-total show-jumper show-page-size @change="PageSize" @page-size-change="change1"
      style="justify-content: center" :page-size="pagination.pageSize" :current="pagination.page" />
    <a-drawer ok-text="保存" cancel-text="关闭" :style="{ zIndex: 999 }" height="95%" :mask-closable="false"
      popup-container=".arco-tabs-content" placement="bottom" :visible="pageData.showAdd" unmountOnClose @ok="sideOk"
      @cancel="sideNo">
      <template #title>
        {{ pageData.sideTitle }}
      </template>
      <a-form :model="querDatas" size="mini" layout="inline" ref="formRef">
        <a-form-item label="记录单号" :style="{ width: '290px' }" label-col-flex="90px">
          <a-input class="bacClass" allow-clear placeholder="" v-model="queryData.recordCode" disabled />
        </a-form-item>
        <a-form-item label="开单日期" :style="{ width: '290px' }" label-col-flex="90px">
          <a-date-picker  popup-container="html"  allow-clear class="bacClass" placeholder=""
            v-model="queryData.recordDate" :disabled="pageData.isDetails" />
        </a-form-item>
        <a-form-item label="流转卡号" :style="{ width: '290px' }" label-col-flex="90px">
          <!-- <a-select popup-container="html" 
            allow-clear
            :class="{ bacClass: !pageData.isDetails }"
            placeholder=""
            v-model="queryData.circulatCard"
            :disabled="pageData.isDetails"
            @focus="focusLz"
            @change="changeCode"
          >
            <a-option
              v-for="(item, index) in pageData.circulatCardList"
              :value="item['flowCardCode']"
              >{{ item['flowCardCode'] }}</a-option
            >
          </a-select> -->
          <a-input allow-clear placeholder="" v-model="queryData.circulatCard" class="bacClass" @change="changeCode" />
        </a-form-item>
        <!-- <a-form-item label="做布工艺" :style="{ width: '290px' }" label-col-flex="90px">
                    <a-input allow-clear :class="{ 'bacClass': !pageData.isDetails }" placeholder=""
                        v-model="queryData.kehuName" :disabled="pageData.isDetails" />
                </a-form-item> -->
        <a-form-item label="客户名称:" :style="{ width: '290px' }" label-col-flex="90px">
          <a-input allow-clear placeholder="" v-model="queryData.customName" disabled class="bacClass"/>
        </a-form-item>
        <a-form-item label="布号:" :style="{ width: '290px' }" label-col-flex="90px">
          <a-input allow-clear placeholder="" v-model="queryData.clothCode" disabled class="bacClass"/>
        </a-form-item>
        <a-form-item label="品名:" :style="{ width: '290px' }" label-col-flex="90px">
          <a-input allow-clear placeholder="" v-model="queryData.brandName" disabled class="bacClass"/>
        </a-form-item>
        <a-form-item label="计划单号:" :style="{ width: '290px' }" label-col-flex="90px">
          <a-input allow-clear placeholder="" v-model="queryData.planCode" disabled class="bacClass"/>
        </a-form-item>
        <a-form-item label="色称:" :style="{ width: '290px' }" label-col-flex="90px">
          <a-input allow-clear placeholder="" v-model="queryData.colorName" disabled class="bacClass"/>
        </a-form-item>
        <a-form-item label="色号:" :style="{ width: '290px' }" label-col-flex="90px">
          <a-input allow-clear placeholder="" v-model="queryData.colorCode" disabled class="bacClass"/>
        </a-form-item>
        <a-form-item label="匹数:" :style="{ width: '290px' }" label-col-flex="90px">
          <a-input allow-clear placeholder="" v-model="queryData.pieceNum" disabled class="bacClass"/>
        </a-form-item>
        <a-form-item label="重量:" :style="{ width: '290px' }" label-col-flex="90px">
          <a-input allow-clear placeholder="" v-model="queryData.weight" disabled class="bacClass"/>
        </a-form-item>

        <a-form-item label="克重:" :style="{ width: '290px' }" label-col-flex="90px">
          <a-input allow-clear placeholder="" v-model="queryData.gramWeight" disabled class="bacClass"/>
        </a-form-item>
        <a-form-item label="客户订单号:" :style="{ width: '290px' }" label-col-flex="90px">
          <a-input allow-clear placeholder="" v-model="queryData.customOrderCode" disabled class="bacClass"/>
        </a-form-item>
        <a-form-item label="坯布名称:" :style="{ width: '290px' }" label-col-flex="90px">
          <a-input allow-clear placeholder="" v-model="queryData.greyName" disabled class="bacClass"/>
        </a-form-item>
        <a-form-item label="门幅:" :style="{ width: '290px' }" label-col-flex="90px">
          <a-input allow-clear placeholder="" v-model="queryData.width" disabled class="bacClass"/>
        </a-form-item>
        <a-form-item label="做布步骤:" :style="{ width: '100%' }" label-col-flex="90px">
          <a-input allow-clear placeholder="" v-model="queryData.clothStep" class="bacClass" />
        </a-form-item>
        <a-form-item label="备注:" :style="{ width: '100%' }" label-col-flex="90px">
          <a-textarea placeholder="" v-model="queryData.remark" :max-length="400" allow-clear
          class="bacClass" show-word-limit />
        </a-form-item>
      </a-form>
      <a-tabs   :lazy-load="true" default-active-key="1">
        <a-tab-pane key="1" title="烧毛工艺">
          <a-space style="margin-bottom: 10px">
            <a-button type="primary" @click="addLine(1)" size="mini">新增</a-button>
            <a-button type="primary" @click="delLine(1)" size="mini">删除</a-button>
          </a-space>
          <a-table size="mini" :scrollbar="true" sticky-header style="height: 400px" stripe
            :row-selection="{ showCheckedAll: true, width: 50, onlyCurrent: true }"
            v-model:selected-keys="selectedRowKeys1" row-key="id" :bordered="{ cell: true }" :pagination="false"
            :columns="tableColumns1" :data="queryData.SpecialManageSinge" :scroll="{ x: '120%', y: '100%' }">
            <template #machine="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.machine" />
              </div>
            </template>
            <template #machineSpeed="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.machineSpeed" />
              </div>
            </template>
            <template #singeCraft="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.singeCraft" />
              </div>
            </template>
            <template #fabricCaldera1="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.fabricCaldera1" />
              </div>
            </template>
            <template #fabricCaldera2="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.fabricCaldera2" />
              </div>
            </template>
            <template #fabricCaldera3="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.fabricCaldera3" />
              </div>
            </template>
            <template #fabricCaldera4="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.fabricCaldera4" />
              </div>
            </template>
            <template #fabricBlast1="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.fabricBlast1" />
              </div>
            </template>
            <template #fabricBlast2="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.fabricBlast2" />
              </div>
            </template>
            <template #fabricBlast3="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.fabricBlast3" />
              </div>
            </template>
            <template #fabricBlast4="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.fabricBlast4" />
              </div>
            </template>
            <template #footCaldera1="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.footCaldera1" />
              </div>
            </template>
            <template #footCaldera2="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.footCaldera2" />
              </div>
            </template>
            <template #footCaldera3="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.footCaldera3" />
              </div>
            </template>
            <template #footCaldera4="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.footCaldera4" />
              </div>
            </template>
            <template #footBlast1="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.footBlast1" />
              </div>
            </template>
            <template #footBlast2="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.footBlast2" />
              </div>
            </template>
            <template #footBlast3="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.footBlast3" />
              </div>
            </template>
            <template #footBlast4="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.footBlast4" />
              </div>
            </template>
          </a-table>
        </a-tab-pane>
        <a-tab-pane key="2" title="刷毛工艺">
          <a-space style="margin-bottom: 10px">
            <a-button type="primary" @click="addLine(2)" size="mini">新增</a-button>
            <a-button type="primary" @click="delLine(2)" size="mini">删除</a-button>
          </a-space>
          <a-table size="mini" :scrollbar="true" sticky-header style="height: 400px" stripe
            :row-selection="{ showCheckedAll: true, width: 50, onlyCurrent: true }"
            v-model:selected-keys="selectedRowKeys2" row-key="id" :bordered="{ cell: true }" :pagination="false"
            :columns="tableColumns2" :data="queryData.SpecialManageBristle" :scroll="{ x: '120%', y: '100%' }">
            <template #fabricGreyMachine="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.fabricGreyMachine" />
              </div>
            </template>
            <template #fabricGreyMachineSpeed="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.fabricGreyMachineSpeed" />
              </div>
            </template>
            <template #fabricGreyWool1="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.fabricGreyWool1" />
              </div>
            </template>
            <template #fabricGreyWool2="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.fabricGreyWool2" />
              </div>
            </template>
            <template #fabricGreyDaxilinSpeed="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.fabricGreyDaxilinSpeed" />
              </div>
            </template>
            <template #fabricGreyDaxilinTension="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.fabricGreyDaxilinTension" />
              </div>
            </template>
            <template #fabricGreyOutClothTension="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.fabricGreyOutClothTension" />
              </div>
            </template>
            <template #fabricGreyPutClothSpeed="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.fabricGreyPutClothSpeed" />
              </div>
            </template>
            <template #fabricProductMachine="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.fabricProductMachine" />
              </div>
            </template>
            <template #fabricProductMachineSpeed="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.fabricProductMachineSpeed" />
              </div>
            </template>
            <template #fabricProductWool1="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.fabricProductWool1" />
              </div>
            </template>
            <template #fabricProductWool2="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.fabricProductWool2" />
              </div>
            </template>
            <template #fabricProductDaxilinSpeed="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.fabricProductDaxilinSpeed" />
              </div>
            </template>
            <template #fabricProductDaxilinTension="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.fabricProductDaxilinTension" />
              </div>
            </template>
            <template #fabricProductOutClothTension="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.fabricProductOutClothTension" />
              </div>
            </template>
            <template #fabricProductPutClothSpeed="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.fabricProductPutClothSpeed" />
              </div>
            </template>
            <template #footGreyMachine="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.footGreyMachine" />
              </div>
            </template>
            <template #footGreyMachineSpeed="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.footGreyMachineSpeed" />
              </div>
            </template>
            <template #footGreyWool1="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.footGreyWool1" />
              </div>
            </template>
            <template #footGreyWool2="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.footGreyWool2" />
              </div>
            </template>
            <template #footGreyDaxilinSpeed="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.footGreyDaxilinSpeed" />
              </div>
            </template>
            <template #footGreyDaxilinTension="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.footGreyDaxilinTension" />
              </div>
            </template>
            <template #footGreyOutClothTension="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.footGreyOutClothTension" />
              </div>
            </template>
            <template #footGreyPutClothSpeed="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.footGreyPutClothSpeed" />
              </div>
            </template>
            <template #footProductMachine="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.footProductMachine" />
              </div>
            </template>
            <template #footProductMachineSpeed="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.footProductMachineSpeed" />
              </div>
            </template>
            <template #footProductWool1="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.footProductWool1" />
              </div>
            </template>
            <template #footProductWool2="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.footProductWool2" />
              </div>
            </template>
            <template #footProductDaxilinSpeed="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.footProductDaxilinSpeed" />
              </div>
            </template>
            <template #footProductDaxilinTension="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.footProductDaxilinTension" />
              </div>
            </template>
            <template #footProductOutClothTension="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.footProductOutClothTension" />
              </div>
            </template>
            <template #footProductPutClothSpeed="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.footProductPutClothSpeed" />
              </div>
            </template>
            <template #fabricGreyInClothTension="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.fabricGreyInClothTension" />
              </div>
            </template>

            <template #fabricProductInClothTension="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.fabricProductInClothTension" />
              </div>
            </template>

            <template #footGreyInClothTension="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.footGreyInClothTension" />
              </div>
            </template>

            <template #footProductInClothTension="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.footProductInClothTension" />
              </div>
            </template>
          </a-table>
        </a-tab-pane>
        <a-tab-pane key="3" title="磨毛工艺">
          <a-space style="margin-bottom: 10px">
            <a-button type="primary" @click="addLine(3)" size="mini">新增</a-button>
            <a-button type="primary" @click="delLine(3)" size="mini">删除</a-button>
          </a-space>
          <a-table size="mini" :scrollbar="true" sticky-header style="height: 400px" stripe
            :row-selection="{ showCheckedAll: true, width: 50, onlyCurrent: true }"
            v-model:selected-keys="selectedRowKeys3" row-key="id" :bordered="{ cell: true }" :pagination="false"
            :columns="tableColumns3" :data="queryData.SpecialManageSand" :scroll="{ x: '120%', y: '100%' }">
            <template #machine="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.machine" />
              </div>
            </template>
            <template #machineSpeed="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.machineSpeed" />
              </div>
            </template>
            <template #sandCraft="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.sandCraft" />
              </div>
            </template>
            <template #sandModelStick1="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.sandModelStick1" />
              </div>
            </template>
            <template #justBackTurnStick1="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.justBackTurnStick1" />
              </div>
            </template>
            <template #pressureStick1="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.pressureStick1" />
              </div>
            </template>
            <template #sandModelStick2="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.sandModelStick2" />
              </div>
            </template>
            <template #justBackTurnStick2="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.justBackTurnStick2" />
              </div>
            </template>
            <template #pressureStick2="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.pressureStick2" />
              </div>
            </template>
            <template #sandModelStick3="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.sandModelStick3" />
              </div>
            </template>
            <template #justBackTurnStick3="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.justBackTurnStick3" />
              </div>
            </template>
            <template #pressureStick3="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.pressureStick3" />
              </div>
            </template>
            <template #sandModelStick4="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.sandModelStick4" />
              </div>
            </template>
            <template #justBackTurnStick4="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.justBackTurnStick4" />
              </div>
            </template>
            <template #pressureStick4="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.pressureStick4" />
              </div>
            </template>
            <template #sandModelStick5="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.sandModelStick5" />
              </div>
            </template>
            <template #justBackTurnStick5="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.justBackTurnStick5" />
              </div>
            </template>
            <template #pressureStick5="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.pressureStick5" />
              </div>
            </template>
            <template #sandModelStick6="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.sandModelStick6" />
              </div>
            </template>
            <template #justBackTurnStick6="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.justBackTurnStick6" />
              </div>
            </template>
            <template #pressureStick6="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.pressureStick6" />
              </div>
            </template>
          </a-table>
        </a-tab-pane>
        <a-tab-pane key="4" title="抓毛工艺">
          <a-space style="margin-bottom: 10px">
            <a-button type="primary" @click="addLine(4)" size="mini">新增</a-button>
            <a-button type="primary" @click="delLine(4)" size="mini">删除</a-button>
          </a-space>
          <a-table size="mini" :scrollbar="true" sticky-header style="height: 400px" stripe
            :row-selection="{ showCheckedAll: true, width: 50, onlyCurrent: true }"
            v-model:selected-keys="selectedRowKeys4" row-key="id" :bordered="{ cell: true }" :pagination="false"
            :columns="tableColumns4" :data="queryData.SpecialManageScratch" :scroll="{ x: '120%', y: '100%' }">
            <template #scratchType="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.scratchType" />
              </div>
            </template>
            <template #firstMachineNo="{ record }">
              <div style="width: 100%">
                <a-input :class="{ bacClass: !record['disable'] }" v-model="record.firstMachineNo"
                  :disabled="record['disable']" />
              </div>
            </template>
            <template #firstMachineSpeed="{ record }">
              <div style="width: 100%">
                <a-input :class="{ bacClass: !record['disable'] }" v-model="record.firstMachineSpeed"
                  :disabled="record['disable']" />
              </div>
            </template>
            <template #firstGrabFrontBuffon="{ record }">
              <div style="width: 100%">
                <a-input :class="{ bacClass: !record['disable'] }" v-model="record.firstGrabFrontBuffon"
                  :disabled="record['disable']" />
              </div>
            </template>
            <template #firstGrabAfterBuffon="{ record }">
              <div style="width: 100%">
                <a-input :class="{ bacClass: !record['disable'] }" v-model="record.firstGrabAfterBuffon"
                  :disabled="record['disable']" />
              </div>
            </template>
            <template #firstNumber1="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.firstNumber1" />
              </div>
            </template>
            <template #firstNumber2="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.firstNumber2" />
              </div>
            </template>
            <template #firstNumber3="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.firstNumber3" />
              </div>
            </template>
            <template #firstNumber4="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.firstNumber4" />
              </div>
            </template>
            <template #firstNumber5="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.firstNumber5" />
              </div>
            </template>
            <template #firstNumber6="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.firstNumber6" />
              </div>
            </template>
            <template #firstNumber7="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.firstNumber7" />
              </div>
            </template>
            <template #firstNumber8="{ record }">
              <div style="width: 100%">
                <a-input :class="{ bacClass: !record['disable'] }" v-model="record.firstNumber8" />
              </div>
            </template>
            <template #secondMachineNo="{ record }">
              <div style="width: 100%">
                <a-input :class="{ bacClass: !record['disable'] }" v-model="record.secondMachineNo"
                  :disabled="record['disable']" />
              </div>
            </template>
            <template #secondMachineSpeed="{ record }">
              <div style="width: 100%">
                <a-input :class="{ bacClass: !record['disable'] }" v-model="record.secondMachineSpeed"
                  :disabled="record['disable']" />
              </div>
            </template>
            <template #secondGrabFrontBuffon="{ record }">
              <div style="width: 100%">
                <a-input :class="{ bacClass: !record['disable'] }" v-model="record.secondGrabFrontBuffon"
                  :disabled="record['disable']" />
              </div>
            </template>
            <template #secondGrabAfterBuffon="{ record }">
              <div style="width: 100%">
                <a-input :class="{ bacClass: !record['disable'] }" v-model="record.secondGrabAfterBuffon"
                  :disabled="record['disable']" />
              </div>
            </template>
            <template #secondNumber1="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.secondNumber1" />
              </div>
            </template>
            <template #secondNumber2="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.secondNumber2" />
              </div>
            </template>
            <template #secondNumber3="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.secondNumber3" />
              </div>
            </template>
            <template #secondNumber4="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.secondNumber4" />
              </div>
            </template>
            <template #secondNumber5="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.secondNumber5" />
              </div>
            </template>
            <template #secondNumber6="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.secondNumber6" />
              </div>
            </template>
            <template #secondNumber7="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.secondNumber7" />
              </div>
            </template>
            <template #secondNumber8="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.secondNumber8" />
              </div>
            </template>
          </a-table>
        </a-tab-pane>
        <a-tab-pane key="5" title="梳毛工艺">
          <a-space style="margin-bottom: 10px">
            <a-button type="primary" @click="addLine(5)" size="mini">新增</a-button>
            <a-button type="primary" @click="delLine(5)" size="mini">删除</a-button>
          </a-space>
          <a-table size="mini" :scrollbar="true" sticky-header style="height: 400px" stripe
            :row-selection="{ showCheckedAll: true, width: 50, onlyCurrent: true }"
            v-model:selected-keys="selectedRowKeys5" row-key="id" :bordered="{ cell: true }" :pagination="false"
            :columns="tableColumns5" :data="queryData.SpecialManageComb" :scroll="{ x: '120%', y: '100%' }">
            <template #machineNo="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.machineNo" />
              </div>
            </template>
            <template #upDownPressure="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.upDownPressure" />
              </div>
            </template>
            <template #downUpPressure="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.downUpPressure" />
              </div>
            </template>
            <template #clothSpeed="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.clothSpeed" />
              </div>
            </template>
            <template #totalPressureGauge="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.totalPressureGauge" />
              </div>
            </template>
            <template #pressureGauge="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.pressureGauge" />
              </div>
            </template>
          </a-table>
        </a-tab-pane>
        <a-tab-pane key="6" title="剪毛工艺">
          <a-space style="margin-bottom: 10px">
            <a-button type="primary" @click="addLine(6)" size="mini">新增</a-button>
            <a-button type="primary" @click="delLine(6)" size="mini">删除</a-button>
          </a-space>
          <a-table size="mini" :scrollbar="true" sticky-header style="height: 400px" stripe
            :row-selection="{ showCheckedAll: true, width: 50, onlyCurrent: true }"
            v-model:selected-keys="selectedRowKeys6" row-key="id" :bordered="{ cell: true }" :pagination="false"
            :columns="tableColumns6" :data="queryData.SpecialManageShear" :scroll="{ x: '120%', y: '100%' }">
            <template #machineNo="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.machineNo" />
              </div>
            </template>
            <template #cutFaceBack="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.cutFaceBack" />
              </div>
            </template>
            <template #clothSpeed="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.clothSpeed" />
              </div>
            </template>
            <template #tension="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.tension" />
              </div>
            </template>
            <template #cutHairLand="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.cutHairLand" />
              </div>
            </template>
            <template #forceSpeed="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.forceSpeed" />
              </div>
            </template>
          </a-table>
        </a-tab-pane>
        <a-tab-pane key="7" title="摇毛工艺">
          <a-space style="margin-bottom: 10px">
            <a-button type="primary" @click="addLine(7)" size="mini">新增</a-button>
            <a-button type="primary" @click="delLine(7)" size="mini">删除</a-button>
          </a-space>
          <a-table size="mini" :scrollbar="true" sticky-header style="height: 400px" stripe
            :row-selection="{ showCheckedAll: true, width: 50, onlyCurrent: true }"
            v-model:selected-keys="selectedRowKeys7" row-key="id" :bordered="{ cell: true }" :pagination="false"
            :columns="tableColumns7" :data="queryData.SpecialManageFluff" :scroll="{ x: '120%', y: '100%' }">
            <template #machineNo="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.machineNo" />
              </div>
            </template>
            <template #setHeat="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.setHeat" />
              </div>
            </template>
            <template #actualHeat="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.actualHeat" />
              </div>
            </template>
            <template #dispelCottonDuration="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.dispelCottonDuration" />
              </div>
            </template>
            <template #steamDuration="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.steamDuration" />
              </div>
            </template>
            <template #hotwindDuration="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.hotwindDuration" />
              </div>
            </template>
            <template #coldwindDuration="{ record }">
              <div style="width: 100%">
                <a-input class="bacClass" v-model="record.coldwindDuration" />
              </div>
            </template>
          </a-table>
        </a-tab-pane>
      </a-tabs>
    </a-drawer>
    <a-modal draggable :visible="visible" @ok="handleOk" @cancel="handleCancel" okText="打印" cancelText="关闭" unmountOnClose
      :width="1200">
      <template #title> 打印 </template>
      <div id="ht">
        <div style="width: 100%">
          <h2 style="margin: 0 auto; width: 100%; text-align: center">特整工艺管理表</h2>
          <table style="border-collapse: collapse; width: 100%" class="table">
            <tr>
              <td>客户</td>
              <td>{{ queryData['customName'] }}</td>
              <td>色号</td>
              <td>{{ queryData['colorCode'] }}</td>
              <td>颜色</td>
              <td>{{ queryData['colorName'] }}</td>
              <td>缸号</td>
              <td>1111</td>
            </tr>
            <tr>
              <td>坯布类型</td>
              <td colspan="3">1111</td>
              <td>纱牌</td>
              <td colspan="3">1111</td>
            </tr>
            <tr>
              <td>材料成分</td>
              <td colspan="3">1111</td>
              <td>货号</td>
              <td>1111</td>
              <td>坯布批号</td>
              <td>1111</td>
            </tr>
            <tr>
              <td>成品布类</td>
              <td colspan="7">1111</td>
            </tr>
            <tr>
              <td>做布步骤</td>
              <td colspan="7">{{ queryData['clothStep'] }}</td>
            </tr>
          </table>
          <table style="border-collapse: collapse; width: 100%" class="table">
            <tr>
              <td colspan="8">烧毛工艺</td>
            </tr>
            <tr>
              <td>机台</td>
              <td>{{ queryData['SpecialManageSinge'][0]['machine'] }}</td>
              <td>机速</td>
              <td>{{ queryData['SpecialManageSinge'][0]['machineSpeed'] }}</td>
              <td>烧毛工艺</td>
              <td colspan="3">{{ queryData['SpecialManageSinge'][0]['singeCraft'] }}</td>
            </tr>
            <tr>
              <td colspan="4">面</td>
              <td colspan="4">底</td>
            </tr>
            <tr>
              <td>火口1</td>
              <td>{{ queryData['SpecialManageSinge'][0]['fabricCaldera1'] }}</td>
              <td>鼓风1</td>
              <td>{{ queryData['SpecialManageSinge'][0]['fabricBlast1'] }}</td>
              <td>火口1</td>
              <td>{{ queryData['SpecialManageSinge'][0]['footCaldera1'] }}</td>
              <td>鼓风1</td>
              <td>{{ queryData['SpecialManageSinge'][0]['footBlast1'] }}</td>
            </tr>
            <tr>
              <td>火口2</td>
              <td>{{ queryData['SpecialManageSinge'][0]['fabricCaldera2'] }}</td>
              <td>鼓风2</td>
              <td>{{ queryData['SpecialManageSinge'][0]['fabricBlast2'] }}</td>
              <td>火口2</td>
              <td>{{ queryData['SpecialManageSinge'][0]['footCaldera2'] }}</td>
              <td>鼓风2</td>
              <td>{{ queryData['SpecialManageSinge'][0]['footBlast2'] }}</td>
            </tr>
            <tr>
              <td>火口3</td>
              <td>{{ queryData['SpecialManageSinge'][0]['fabricCaldera3'] }}</td>
              <td>鼓风3</td>
              <td>{{ queryData['SpecialManageSinge'][0]['fabricBlast3'] }}</td>
              <td>火口3</td>
              <td>{{ queryData['SpecialManageSinge'][0]['footCaldera3'] }}</td>
              <td>鼓风3</td>
              <td>{{ queryData['SpecialManageSinge'][0]['footBlast3'] }}</td>
            </tr>
            <tr>
              <td>火口4</td>
              <td>{{ queryData['SpecialManageSinge'][0]['fabricCaldera4'] }}</td>
              <td>鼓风4</td>
              <td>{{ queryData['SpecialManageSinge'][0]['fabricBlast4'] }}</td>
              <td>火口4</td>
              <td>{{ queryData['SpecialManageSinge'][0]['footCaldera4'] }}</td>
              <td>鼓风4</td>
              <td>{{ queryData['SpecialManageSinge'][0]['footBlast4'] }}</td>
            </tr>
          </table>
          <table style="border-collapse: collapse; width: 100%" class="table">
            <tr>
              <td colspan="16">刷毛工艺</td>
            </tr>
            <tr>
              <td colspan="8">面</td>
              <td colspan="8">底</td>
            </tr>
            <tr>
              <td colspan="4">坯布刷毛</td>
              <td colspan="4">半成品刷毛</td>
              <td colspan="4">坯布刷毛</td>
              <td colspan="4">半成品刷毛</td>
            </tr>
            <tr>
              <td>机台</td>
              <td>{{ queryData['SpecialManageBristle'][0]['fabricGreyMachine'] }}</td>
              <td>机速</td>
              <td>{{ queryData['SpecialManageBristle'][0]['fabricGreyMachineSpeed'] }}</td>
              <td>机台</td>
              <td>{{ queryData['SpecialManageBristle'][0]['fabricProductMachine'] }}</td>
              <td>机速</td>
              <td>{{ queryData['SpecialManageBristle'][0]['fabricProductMachineSpeed'] }}</td>
              <td>机台</td>
              <td>{{ queryData['SpecialManageBristle'][0]['footGreyMachine'] }}</td>
              <td>机速</td>
              <td>{{ queryData['SpecialManageBristle'][0]['footGreyMachineSpeed'] }}</td>
              <td>机台</td>
              <td>{{ queryData['SpecialManageBristle'][0]['footProductMachine'] }}</td>
              <td>机速</td>
              <td>{{ queryData['SpecialManageBristle'][0]['footProductMachineSpeed'] }}</td>
            </tr>

            <tr>
              <td>1#毛绒刷</td>
              <td colspan="3">{{ queryData['SpecialManageBristle'][0]['fabricGreyWool1'] }}</td>
              <td>1#毛绒刷</td>
              <td colspan="3">{{ queryData['SpecialManageBristle'][0]['fabricProductWool1'] }}</td>
              <td>1#毛绒刷</td>
              <td colspan="3">{{ queryData['SpecialManageBristle'][0]['footGreyWool1'] }}</td>
              <td>1#毛绒刷</td>
              <td colspan="3">{{ queryData['SpecialManageBristle'][0]['footProductWool1'] }}</td>
            </tr>
            <tr>
              <td>2#毛绒刷</td>
              <td colspan="3">{{ queryData['SpecialManageBristle'][0]['fabricGreyWool2'] }}</td>
              <td>2#毛绒刷</td>
              <td colspan="3">{{ queryData['SpecialManageBristle'][0]['fabricProductWool2'] }}</td>
              <td>2#毛绒刷</td>
              <td colspan="3">{{ queryData['SpecialManageBristle'][0]['footGreyWool2'] }}</td>
              <td>2#毛绒刷</td>
              <td colspan="3">{{ queryData['SpecialManageBristle'][0]['footProductWool2'] }}</td>
            </tr>
            <tr>
              <td>大锡林速度</td>
              <td colspan="3">{{
                queryData['SpecialManageBristle'][0]['fabricGreyDaxilinSpeed']
              }}</td>
              <td>大锡林速度</td>
              <td colspan="3">{{
                queryData['SpecialManageBristle'][0]['fabricProductDaxilinSpeed']
              }}</td>
              <td>大锡林速度</td>
              <td colspan="3">{{
                queryData['SpecialManageBristle'][0]['footGreyDaxilinSpeed']
              }}</td>
              <td>大锡林速度</td>
              <td colspan="3">{{
                queryData['SpecialManageBristle'][0]['footProductDaxilinSpeed']
              }}</td>
            </tr>
            <tr>
              <td>大锡林张力</td>
              <td colspan="3">{{
                queryData['SpecialManageBristle'][0]['fabricGreyDaxilinTension']
              }}</td>
              <td>大锡林张力</td>
              <td colspan="3">{{
                queryData['SpecialManageBristle'][0]['fabricProductDaxilinTension']
              }}</td>
              <td>大锡林张力</td>
              <td colspan="3">{{
                queryData['SpecialManageBristle'][0]['footGreyOutClothTension']
              }}</td>
              <td>大锡林张力</td>
              <td colspan="3">{{
                queryData['SpecialManageBristle'][0]['footProductDaxilinTension']
              }}</td>
            </tr>
            <tr>
              <td>出布张力</td>
              <td colspan="3">{{
                queryData['SpecialManageBristle'][0]['fabricGreyOutClothTension']
              }}</td>
              <td>出布张力</td>
              <td colspan="3">{{
                queryData['SpecialManageBristle'][0]['fabricProductOutClothTension']
              }}</td>
              <td>出布张力</td>
              <td colspan="3">{{
                queryData['SpecialManageBristle'][0]['footGreyOutClothTension']
              }}</td>
              <td>出布张力</td>
              <td colspan="3">{{
                queryData['SpecialManageBristle'][0]['footProductOutClothTension']
              }}</td>
            </tr>
            <tr>
              <td>进布张力</td>
              <td colspan="3">{{
                queryData['SpecialManageBristle'][0]['fabricGreyInClothTension']
              }}</td>
              <td>进布张力</td>
              <td colspan="3">{{
                queryData['SpecialManageBristle'][0]['fabricProductInClothTension']
              }}</td>
              <td>进布张力</td>
              <td colspan="3">{{
                queryData['SpecialManageBristle'][0]['footGreyInClothTension']
              }}</td>
              <td>进布张力</td>
              <td colspan="3">{{
                queryData['SpecialManageBristle'][0]['footProductInClothTension']
              }}</td>
            </tr>
            <tr>
              <td>摆布速度</td>
              <td colspan="3">{{
                queryData['SpecialManageBristle'][0]['fabricGreyPutClothSpeed']
              }}</td>
              <td>摆布速度</td>
              <td colspan="3">{{
                queryData['SpecialManageBristle'][0]['fabricProductPutClothSpeed']
              }}</td>
              <td>摆布速度</td>
              <td colspan="3">{{
                queryData['SpecialManageBristle'][0]['footGreyPutClothSpeed']
              }}</td>
              <td>摆布速度</td>
              <td colspan="3">{{
                queryData['SpecialManageBristle'][0]['footProductPutClothSpeed']
              }}</td>
            </tr>
          </table>
          <table style="border-collapse: collapse; width: 100%" class="table">
            <tr>
              <td colspan="18">磨毛工艺</td>
            </tr>
            <tr>
              <td colspan="2" rowspan="2">机台</td>
              <td colspan="4">{{ queryData['SpecialManageSand'][0]['machine'] }}</td>
              <td colspan="2">机速</td>
              <td colspan="4">{{ queryData['SpecialManageSand'][0]['machineSpeed'] }}</td>
              <td colspan="2">磨毛工艺</td>
              <td colspan="4">{{ queryData['SpecialManageSand'][0]['sandCraft'] }}</td>
            </tr>
            <tr>
              <td colspan="3">磨毛棍-1</td>
              <td colspan="3">磨毛棍-2</td>
              <td colspan="3">磨毛棍-3</td>
              <td colspan="3">磨毛棍-4</td>
              <td colspan="3">磨毛棍-5</td>
              <td colspan="3">磨毛棍-6</td>
            </tr>
            <tr>
              <td>砂纸型号</td>
              <td>正/反转</td>
              <td>压力</td>
              <td>砂纸型号</td>
              <td>正/反转</td>
              <td>压力</td>
              <td>砂纸型号</td>
              <td>正/反转</td>
              <td>压力</td>
              <td>砂纸型号</td>
              <td>正/反转</td>
              <td>压力</td>
              <td>砂纸型号</td>
              <td>正/反转</td>
              <td>压力</td>
              <td>砂纸型号</td>
              <td>正/反转</td>
              <td>压力</td>
            </tr>
            <tr>
              <td>{{ queryData['SpecialManageSand'][0]['sandModelStick1'] }}</td>
              <td>{{ queryData['SpecialManageSand'][0]['justBackTurnStick1'] }}</td>
              <td>{{ queryData['SpecialManageSand'][0]['pressureStick1'] }}</td>
              <td>{{ queryData['SpecialManageSand'][0]['sandModelStick2'] }}</td>
              <td>{{ queryData['SpecialManageSand'][0]['justBackTurnStick2'] }}</td>
              <td>{{ queryData['SpecialManageSand'][0]['pressureStick2'] }}</td>
              <td>{{ queryData['SpecialManageSand'][0]['sandModelStick3'] }}</td>
              <td>{{ queryData['SpecialManageSand'][0]['justBackTurnStick3'] }}</td>
              <td>{{ queryData['SpecialManageSand'][0]['pressureStick3'] }}</td>
              <td>{{ queryData['SpecialManageSand'][0]['sandModelStick4'] }}</td>
              <td>{{ queryData['SpecialManageSand'][0]['justBackTurnStick4'] }}</td>
              <td>{{ queryData['SpecialManageSand'][0]['pressureStick4'] }}</td>
              <td>{{ queryData['SpecialManageSand'][0]['sandModelStick5'] }}</td>
              <td>{{ queryData['SpecialManageSand'][0]['justBackTurnStick5'] }}</td>
              <td>{{ queryData['SpecialManageSand'][0]['pressureStick5'] }}</td>
              <td>{{ queryData['SpecialManageSand'][0]['sandModelStick6'] }}</td>
              <td>{{ queryData['SpecialManageSand'][0]['justBackTurnStick6'] }}</td>
              <td>{{ queryData['SpecialManageSand'][0]['pressureStick6'] }}</td>
            </tr>
          </table>
          <table style="border-collapse: collapse; width: 100%" class="table">
            <tr>
              <td colspan="18">抓毛工艺</td>
            </tr>
            <tr>
              <td colspan="9">第一次抓毛</td>
              <td colspan="9">第二次抓毛</td>
            </tr>
            <tr>
              <td colspan="2">机台</td>
              <td colspan="7">{{ queryData['SpecialManageScratch'][0]['firstMachineNo'] }}</td>
              <td colspan="2">机台</td>
              <td colspan="7">{{ queryData['SpecialManageScratch'][0]['secondMachineNo'] }}</td>
            </tr>
            <tr>
              <td>机速</td>
              <td colspan="2">{{ queryData['SpecialManageScratch'][0]['firstMachineSpeed'] }}</td>
              <td>抓前布封</td>
              <td colspan="2">{{
                queryData['SpecialManageScratch'][0]['firstGrabFrontBuffon']
              }}</td>
              <td>抓后布封</td>
              <td colspan="2">{{
                queryData['SpecialManageScratch'][0]['firstGrabAfterBuffon']
              }}</td>
              <td>机速</td>
              <td colspan="2">{{ queryData['SpecialManageScratch'][0]['secondMachineSpeed'] }}</td>
              <td>抓前布封</td>
              <td colspan="2">{{
                queryData['SpecialManageScratch'][0]['secondGrabFrontBuffon']
              }}</td>
              <td>抓后布封</td>
              <td colspan="2">{{
                queryData['SpecialManageScratch'][0]['secondGrabAfterBuffon']
              }}</td>
            </tr>
            <tr>
              <td>1号</td>
              <td>2号</td>
              <td>3号</td>
              <td>4号</td>
              <td>5号</td>
              <td>6号</td>
              <td>7号</td>
              <td>8号</td>
              <td>1号</td>
              <td>2号</td>
              <td>3号</td>
              <td>4号</td>
              <td>5号</td>
              <td>6号</td>
              <td>7号</td>
              <td>8号</td>
            </tr>
            <tr v-for="(item, index) in queryData.SpecialManageScratch">
              <td colspan="2">{{ item['scratchType'] }}</td>
              <td>{{ item['firstNumber1'] }}</td>
              <td>{{ item['firstNumber2'] }}</td>
              <td>{{ item['firstNumber3'] }}</td>
              <td>{{ item['firstNumber4'] }}</td>
              <td>{{ item['firstNumber5'] }}</td>
              <td>{{ item['firstNumber6'] }}</td>
              <td>{{ item['firstNumber7'] }}</td>
              <td>{{ item['firstNumber8'] }}</td>
              <td>{{ item['secondNumber1'] }}</td>
              <td>{{ item['secondNumber2'] }}</td>
              <td>{{ item['secondNumber3'] }}</td>
              <td>{{ item['secondNumber4'] }}</td>
              <td>{{ item['secondNumber5'] }}</td>
              <td>{{ item['secondNumber6'] }}</td>
              <td>{{ item['secondNumber7'] }}</td>
              <td>{{ item['secondNumber8'] }}</td>
            </tr>
          </table>
          <table style="border-collapse: collapse; width: 100%" class="table">
            <tr>
              <td colspan="6">梳毛工艺</td>
            </tr>
            <tr>
              <td>机台</td>
              <td>起/伏压力</td>
              <td>伏/起压力</td>
              <td>布速度</td>
              <td>总压力</td>
              <td>压力表</td>
            </tr>
            <tr>
              <td>{{ queryData['SpecialManageComb'][0]['machineNo'] }}</td>
              <td>{{ queryData['SpecialManageComb'][0]['upDownPressure'] }}</td>
              <td>{{ queryData['SpecialManageComb'][0]['downUpPressure'] }}</td>
              <td>{{ queryData['SpecialManageComb'][0]['clothSpeed'] }}</td>
              <td>{{ queryData['SpecialManageComb'][0]['totalPressureGauge'] }}</td>
              <td>{{ queryData['SpecialManageComb'][0]['pressureGauge'] }}</td>
            </tr>
          </table>
          <table style="border-collapse: collapse; width: 100%" class="table">
            <tr>
              <td colspan="6">剪毛工艺</td>
            </tr>
            <tr>
              <td>机台</td>
              <td>剪面/剪底</td>
              <td>布速度</td>
              <td>张力</td>
              <td>剪毛厚度表</td>
              <td>圆刀速度</td>
            </tr>
            <tr>
              <td>{{ queryData['SpecialManageShear'][0]['machineNo'] }}</td>
              <td>{{ queryData['SpecialManageShear'][0]['cutFaceBack'] }}</td>
              <td>{{ queryData['SpecialManageShear'][0]['clothSpeed'] }}</td>
              <td>{{ queryData['SpecialManageShear'][0]['tension'] }}</td>
              <td>{{ queryData['SpecialManageShear'][0]['cutHairLand'] }}</td>
              <td>{{ queryData['SpecialManageShear'][0]['forceSpeed'] }}</td>
            </tr>
          </table>
          <table style="border-collapse: collapse; width: 100%" class="table">
            <tr>
              <td colspan="6">摇毛工艺</td>
            </tr>
            <tr>
              <td>机台</td>
              <td>设定温度</td>
              <td>实际温度</td>
              <td>消棉絮时间</td>
              <td>喷蒸时间</td>
              <td>热风时间</td>
              <td>冷风时间</td>
            </tr>
            <tr>
              <td>{{ queryData['SpecialManageFluff'][0]['machineNo'] }}</td>
              <td>{{ queryData['SpecialManageFluff'][0]['setHeat'] }}</td>
              <td>{{ queryData['SpecialManageFluff'][0]['actualHeat'] }}</td>
              <td>{{ queryData['SpecialManageFluff'][0]['dispelCottonDuration'] }}</td>
              <td>{{ queryData['SpecialManageFluff'][0]['steamDuration'] }}</td>
              <td>{{ queryData['SpecialManageFluff'][0]['hotwindDuration'] }}</td>
              <td>{{ queryData['SpecialManageFluff'][0]['coldwindDuration'] }}</td>
            </tr>
          </table>
        </div>
      </div>
    </a-modal>
  </pageTabelLayout>
</template>
<script lang="ts" setup>
import { number } from 'echarts/core'
import { reactive, toRefs, ref } from 'vue'
import {
  useTable,
  useRowKey,
  useTableColumn,
  usePagination,
  useRowSelection,
} from '@/hooks/table'
import { post } from '@/api/http'
import { url } from 'inspector'

import { Message, Modal } from '@arco-design/web-vue'
import { IconDoubleUp, IconDoubleDown } from '@arco-design/web-vue/es/icon'
import { localeText } from '@/api/aggridZw'
import printJS from 'print-js'
import { InputInstance } from '@arco-design/web-vue/es/input'
import { Key } from '@element-plus/icons-vue'
//引入导出方法
import { EXPORTEXEL, EXELTABLE } from '@/utils/exportEXCEL'
const localeText1: any = ref(localeText)

const queryData: any = reactive({
  fabricId: '',
  recordCode: '',
  recordDate: '',
  circulatCard: '',
  planCode: '',
  customName: '',
  clothCode: '',
  brandName: '',
  colorCode: '',
  colorName: '',
  pieceNum: '',
  weight: '',
  width: '',
  gramWeight: '',
  customOrderCode: '',
  greyName: '',
  remark: '',
  clothStep: '',
  SpecialManageSinge: [],
  SpecialManageBristle: [],
  SpecialManageSand: [],
  SpecialManageScratch: [],
  SpecialManageComb: [],
  SpecialManageShear: [],
  SpecialManageFluff: [],
})

const pageData: any = reactive({
  showAdd: false,
  sideTitle: '新增',
  circulatCardList: [],
  fabricId: null,
  id: null,
  dataList: [],
  beginDate: '',
  endDate: '',
  recordCode: '',
  circulatCard: '',
  clothCode: '',
  brandName: '',
  planCode: '',
  customName: '',
  pageLoading: false,
})
const getFocus1 = ref<InputInstance | null>(null)
onMounted(() => {
  getFocus1.value?.focus()
})

const querDatas = ref({})
const formRef = ref()
const sideOk = () => {
  formRef.value?.validate().then((err: any) => {
    if (!err) {
      for (let key in queryData) {
        // queryData['fabricId'] = pageData.fabricId
        if (
          key == 'SpecialManageSinge' ||
          key == 'SpecialManageBristle' ||
          key == 'SpecialManageSand' ||
          key == 'SpecialManageScratch' ||
          key == 'SpecialManageComb' ||
          key == 'SpecialManageShear' ||
          key == 'SpecialManageFluff'
        ) {
          queryData[key].forEach(function (o: any) {
            // o['fabricId'] = pageData.fabricId
            if ((o['id'] + '').indexOf('add') != -1) {
              o['id'] = null
            }
            o['fabricId'] = 1
          })
        }
      }
      pageData.pageLoading = true
      if (pageData.sideTitle === '新增') {
        post({
          url: '/dwWorkShop/SpecialManage/insertList',
          data: queryData,
        })
          .then((res: any) => {
            if (res.code === 200) {
              formRef.value?.resetFields()
              pageData.showAdd = false
              Message.success({
                content: '保存成功',
                duration: 5000,
              })
            } else {
              Message.error({
                content: res.message,
                duration: 5000,
              })
            }
            doRefresh()
          })
          .finally(() => {
            pageData.pageLoading = false
          })
      } else if (pageData.sideTitle === '修改') {
        post({
          url: '/dwWorkShop/SpecialManage/updateList',
          data: queryData,
        })
          .then((res: any) => {
            if (res.code === 200) {
              formRef.value?.resetFields()
              pageData.showAdd = false
              Message.success({
                content: '保存成功',
                duration: 5000,
              })
            } else {
              Message.error({
                content: res.message,
                duration: 5000,
              })
            }
            doRefresh()
          })
          .finally(() => {
            pageData.pageLoading = false
          })
      }
    }
  })
}

const sideNo = () => {
  pageData.showAdd = false
}

const addTz = () => {
  pageData.showAdd = true
  pageData.sideTitle = '新增'
  for (let key in queryData) {
    queryData[key] = ''
    if (
      key == 'SpecialManageSinge' ||
      key == 'SpecialManageBristle' ||
      key == 'SpecialManageSand' ||
      key == 'SpecialManageScratch' ||
      key == 'SpecialManageComb' ||
      key == 'SpecialManageShear' ||
      key == 'SpecialManageFluff'
    ) {
      queryData[key] = []
    }
  }
  getRecordCode()
}
//删除特整
const delTz = () => {
  if (gridOption.value.getSelectedRows().length === 0) {
    Message.error({
      content: '请至少勾选一条数据',
      duration: 5000,
    })
    return
  }
  //遍历勾选数组 拿到id
  const delArr = gridOption.value.getSelectedRows().map((item) => item.id)
  Modal.confirm({
    title: '系统提示',
    content: '确认删除选中的数据?',
    onOk() {
      pageData.pageLoading = true
      post({
        url: '/dwWorkShop/SpecialManage/delete',
        data: delArr,
      })
        .then(({ code, data }: any) => {
          if (code === 200) {
            Message.success({
              content: '删除成功',
              duration: 5000,
            })
            pagination.page = 1
            doRefresh()
          } else {
            Message.error({
              content: '删除失败',
              duration: 5000,
            })
          }
        })
        .finally(() => {
          pageData.pageLoading = false
        })
    },
  })
}
const headerShow = ref<boolean>(true)
function doRefresh() {
  post({
    url: '/dwWorkShop/SpecialManage/getPage',
    data: {
      page: pagination.page,
      size: pagination.pageSize,
      beginDate: pageData.beginDate,
      endDate: pageData.endDate,
      recordCode: pageData.recordCode,
      circulatCard: pageData.circulatCard,
      clothCode: pageData.clothCode,
      brandName: pageData.brandName,
      planCode: pageData.planCode,
      customName: pageData.customName,
    },
  })
    .then(({ data, code }: any) => {
      if (code === 200) {
        table.handleSuccess(data.list)
        // pagination.setTotalSize(data.total);
        gridOption.value.setRowData(data.list)
        total.value = data.total
        pageData.dataList = data.list
      }
    })
    .catch(console.log)
}
const total = ref(0)
const page = ref(1)
const size = ref(0)
function PageSize(val: any) {
  pagination.page = val
  doRefresh()
}
function change1(val: any) {
  pagination.pageSize = val
  doRefresh()
}
const cx = () => {
  pagination.page = 1
  doRefresh()
}

const table = useTable()

const pagination = usePagination(doRefresh)
let selectedRowKeys1 = ref()
let selectedRowKeys2 = ref()
let selectedRowKeys3 = ref()
let selectedRowKeys4 = ref()
let selectedRowKeys5 = ref()
let selectedRowKeys6 = ref()
let selectedRowKeys7 = ref()

const tableColumns = useTableColumn([
  {
    title: '序号',
    key: 'recordCode',
    dataIndex: 'recordCode',
    width: 150,
  },
  // {
  //     title: "条形码",
  //     key: "barCode",
  //     dataIndex: "barCode",
  //     width: 150,
  // },
  {
    title: '流转卡号',
    key: 'circulatCard',
    dataIndex: 'circulatCard',
    width: 150,
  },
  {
    title: '记录单号',
    key: 'recordCode',
    dataIndex: 'recordCode',
    width: 150,
  },
  {
    title: '开单日期',
    key: 'recordDate',
    dataIndex: 'recordDate',
    width: 120,
  },
  {
    title: '客户名称',
    key: 'customName',
    dataIndex: 'customName',
    width: 150,
  },
  {
    title: '客户订单号',
    key: 'customOrderCode',
    dataIndex: 'customOrderCode',
    width: 150,
  },
  {
    title: '布号',
    key: 'clothCode',
    dataIndex: 'clothCode',
    width: 150,
  },
  {
    title: '品名',
    key: 'brandName',
    dataIndex: 'brandName',
    width: 150,
  },
  {
    title: '匹数',
    key: 'pieceNum',
    dataIndex: 'pieceNum',
    width: 150,
  },
  {
    title: '重量',
    key: 'weight',
    dataIndex: 'weight',
    width: 150,
  },
  {
    title: '纱支',
    key: 'greyName',
    dataIndex: 'greyName',
    width: 150,
  },
  {
    title: '纱牌',
    key: 'colorName',
    dataIndex: 'colorName',
    width: 150,
  },
  {
    title: '色号',
    key: 'colorCode',
    dataIndex: 'colorCode',
    width: 150,
  },
  {
    title: '色称',
    key: 'colorName',
    dataIndex: 'colorName',
    width: 150,
  },
  {
    title: '确认色',
    key: 'weight',
    dataIndex: 'weight',
    width: 150,
  },
  {
    title: '门幅',
    key: 'width',
    dataIndex: 'width',
    width: 150,
  },
  {
    title: '克重',
    key: 'gramWeight',
    dataIndex: 'gramWeight',
    width: 150,
  },
  {
    title: '坯布编号',
    key: 'greyCode',
    dataIndex: 'greyCode',
    width: 150,
  },
  {
    title: '坯布名称',
    key: 'greyName',
    dataIndex: 'greyName',
    width: 150,
  },
  {
    title: '做布步骤',
    key: 'clothStep',
    dataIndex: 'clothStep',
    width: 150,
  },
  {
    title: '备注',
    key: 'remark',
    dataIndex: 'remark',
    width: 150,
  },
  {
    title: '建立人',
    key: 'createName',
    dataIndex: 'createName',
    width: 150,
  },
  {
    title: '建立日期',
    key: 'createTime',
    dataIndex: 'createTime',
    width: 150,
  },
  {
    title: '操作',
    key: 'obsoleteState',
    dataIndex: 'obsoleteState',
    slotName: 'obsoleteState',
    width: 110,
    fixed: 'right',
  },
])

let tc: any = tableColumns.map((o) => {
  let obj = {
    headerName: o.title,
    field: o.key,
    pinned: o['fixed'],
  }
  if (o.slotName === 'obsoleteState') {
    obj['resizable'] = false
    obj['filter'] = false
    obj['sortable'] = false
    obj['lockPosition'] = 'right'
    obj['width'] = 110
    obj['cellRenderer'] = {
      template: `<a-space><el-button style="color:#165dff;" link @click="a">修改</el-button>
            <el-button style="color:#165dff;" link @click="b">明细</el-button></a-space>
            `,
      setup(props: any) {
        const a = () => {
          editHandler(props.params.data)
        }
        const b = () => {
          mxHandler(props.params.data)
        }
        return {
          a,
          b,
        }
      },
    }
  }

  return obj
})

let a = [
  {
    showRowGroup: 'hide_def',
    headerName: '',
    checkboxSelection: true,
    headerCheckboxSelection: true,
    pinned: 'left',
    width: 50,
    resizable: false,
    filter: false,
    sortable: false,
    minWidth: 50,
    maxWidth: 50,
    //lockPosition: "left",
  },
]
tc = a.concat(tc)

const dataList = ref('1')
// 表格准备事件
const gridOption = ref()
const gridReady = (params: any) => {
  gridOption.value = params.api
}
const defaultColDef = {
  sortable: true,
  resizable: true,
  filter: true,
  // flex: 1
}
const huiche = () => {
  doRefresh()
}
const editHandler = (record: any) => {
  pageData.sideTitle = '修改'
  pageData.isDetails = false
  pageData.showAdd = true
  for (let key in record) {
    queryData[key] = record[key]
  }
  pageData.fabricId = record['fabricId']
  pageData.id = record['id']
  singeingProcess()
  brushingProcess()
  sandingProcess()
  fleeceProcess()
  cardingProcess()
  shearingProcess()
  shakingProcess()
  clothMakingSteps()
}
const mxHandler = (record: any) => {
  pageData.isDetails = true
  pageData.sideTitle = '明细'
  pageData.showAdd = true
  for (let key in record) {
    queryData[key] = record[key]
  }
  pageData.fabricId = record['fabricId']
  pageData.id = record['id']
  singeingProcess()
  brushingProcess()
  sandingProcess()
  fleeceProcess()
  cardingProcess()
  shearingProcess()
  shakingProcess()
  clothMakingSteps()
}

const tableColumns1 = [
  {
    title: '机台',
    key: 'machine',
    dataIndex: 'machine',
    slotName: 'machine',
    width: 150,
  },
  {
    title: '机速',
    key: 'machineSpeed',
    dataIndex: 'machineSpeed',
    slotName: 'machineSpeed',
    width: 150,
  },
  {
    title: '烧毛工艺',
    key: 'singeCraft',
    dataIndex: 'singeCraft',
    slotName: 'singeCraft',
    width: 150,
  },
  {
    title: '面',
    children: [
      {
        title: '火口-1',
        dataIndex: 'fabricCaldera1',
        slotName: 'fabricCaldera1',
        width: 150,
      },
      {
        title: '火口-2',
        dataIndex: 'fabricCaldera2',
        slotName: 'fabricCaldera2',
        width: 150,
      },
      {
        title: '火口-3',
        dataIndex: 'fabricCaldera3',
        slotName: 'fabricCaldera3',
        width: 150,
      },
      {
        title: '火口-4',
        dataIndex: 'fabricCaldera4',
        slotName: 'fabricCaldera4',
        width: 150,
      },
      {
        title: '鼓风-1',
        dataIndex: 'fabricBlast1',
        slotName: 'fabricBlast1',
        width: 150,
      },
      {
        title: '鼓风-2',
        dataIndex: 'fabricBlast2',
        slotName: 'fabricBlast2',
        width: 150,
      },
      {
        title: '鼓风-3',
        dataIndex: 'fabricBlast3',
        slotName: 'fabricBlast3',
        width: 150,
      },
      {
        title: '鼓风-4',
        dataIndex: 'fabricBlast4',
        slotName: 'fabricBlast4',
        width: 150,
      },
    ],
  },
  {
    title: '底',
    children: [
      {
        title: '火口-1',
        dataIndex: 'footCaldera1',
        slotName: 'footCaldera1',
        width: 150,
      },
      {
        title: '火口-2',
        dataIndex: 'footCaldera2',
        slotName: 'footCaldera2',
        width: 150,
      },
      {
        title: '火口-3',
        dataIndex: 'footCaldera3',
        slotName: 'footCaldera3',
        width: 150,
      },
      {
        title: '火口-4',
        dataIndex: 'footCaldera4',
        slotName: 'footCaldera4',
        width: 150,
      },
      {
        title: '鼓风-1',
        dataIndex: 'footBlast1',
        slotName: 'footBlast1',
        width: 150,
      },
      {
        title: '鼓风-2',
        dataIndex: 'footBlast2',
        slotName: 'footBlast2',
        width: 150,
      },
      {
        title: '鼓风-3',
        dataIndex: 'footBlast3',
        slotName: 'footBlast3',
        width: 150,
      },
      {
        title: '鼓风-4',
        dataIndex: 'footBlast4',
        slotName: 'footBlast4',
        width: 150,
      },
    ],
  },
]

const tableColumns2 = [
  {
    title: '面',
    children: [
      {
        title: '坯布刷毛',
        children: [
          {
            title: '机台号',
            dataIndex: 'fabricGreyMachine',
            slotName: 'fabricGreyMachine',
            width: 150,
          },
          {
            title: '机速',
            dataIndex: 'fabricGreyMachineSpeed',
            slotName: 'fabricGreyMachineSpeed',
            width: 150,
          },
          {
            title: '1#毛线刷',
            dataIndex: 'fabricGreyWool1',
            slotName: 'fabricGreyWool1',
            width: 150,
          },
          {
            title: '2#毛线刷',
            dataIndex: 'fabricGreyWool2',
            slotName: 'fabricGreyWool2',
            width: 150,
          },
          {
            title: '大锡林速度',
            dataIndex: 'fabricGreyDaxilinSpeed',
            slotName: 'fabricGreyDaxilinSpeed',
            width: 150,
          },
          {
            title: '大锡林张力',
            dataIndex: 'fabricGreyDaxilinTension',
            slotName: 'fabricGreyDaxilinTension',
            width: 150,
          },
          {
            title: '出布张力',
            dataIndex: 'fabricGreyOutClothTension',
            slotName: 'fabricGreyOutClothTension',
            width: 150,
          },
          {
            title: '进布张力',
            dataIndex: 'fabricGreyInClothTension',
            slotName: 'fabricGreyInClothTension',
            width: 150,
          },
          {
            title: '摆布张力',
            dataIndex: 'fabricGreyPutClothSpeed',
            slotName: 'fabricGreyPutClothSpeed',
            width: 150,
          },
        ],
      },
      {
        title: '半成品刷毛',
        children: [
          {
            title: '机台号',
            dataIndex: 'fabricProductMachine',
            slotName: 'fabricProductMachine',
            width: 150,
          },
          {
            title: '机速',
            dataIndex: 'fabricProductMachineSpeed',
            slotName: 'fabricProductMachineSpeed',
            width: 150,
          },
          {
            title: '1#毛线刷',
            dataIndex: 'fabricProductWool1',
            slotName: 'fabricProductWool1',
            width: 150,
          },
          {
            title: '2#毛线刷',
            dataIndex: 'fabricProductWool2',
            slotName: 'fabricProductWool2',
            width: 150,
          },
          {
            title: '大锡林速度',
            dataIndex: 'fabricProductDaxilinSpeed',
            slotName: 'fabricProductDaxilinSpeed',
            width: 150,
          },
          {
            title: '大锡林张力',
            dataIndex: 'fabricProductDaxilinTension',
            slotName: 'fabricProductDaxilinTension',
            width: 150,
          },
          {
            title: '出布张力',
            dataIndex: 'fabricProductOutClothTension',
            slotName: 'fabricProductOutClothTension',
            width: 150,
          },
          {
            title: '进布张力',
            dataIndex: 'fabricProductInClothTension',
            slotName: 'fabricProductInClothTension',
            width: 150,
          },
          {
            title: '摆布速度',
            dataIndex: 'fabricProductPutClothSpeed',
            slotName: 'fabricProductPutClothSpeed',
            width: 150,
          },
        ],
      },
    ],
  },
  {
    title: '底',
    children: [
      {
        title: '坯布刷毛',
        children: [
          {
            title: '机台号',
            dataIndex: 'footGreyMachine',
            slotName: 'footGreyMachine',
            width: 150,
          },
          {
            title: '机速',
            dataIndex: 'footGreyMachineSpeed',
            slotName: 'footGreyMachineSpeed',
            width: 150,
          },
          {
            title: '1#毛线刷',
            dataIndex: 'footGreyWool1',
            slotName: 'footGreyWool1',
            width: 150,
          },
          {
            title: '2#毛线刷',
            dataIndex: 'footGreyWool2',
            slotName: 'footGreyWool2',
            width: 150,
          },
          {
            title: '大锡林速度',
            dataIndex: 'footGreyDaxilinSpeed',
            slotName: 'footGreyDaxilinSpeed',
            width: 150,
          },
          {
            title: '大锡林张力',
            dataIndex: 'footGreyDaxilinTension',
            slotName: 'footGreyDaxilinTension',
            width: 150,
          },
          {
            title: '出布张力',
            dataIndex: 'footGreyOutClothTension',
            slotName: 'footGreyOutClothTension',
            width: 150,
          },
          {
            title: '进布张力',
            dataIndex: 'footGreyInClothTension',
            slotName: 'footGreyInClothTension',
            width: 150,
          },
          {
            title: '摆布速度',
            dataIndex: 'footGreyPutClothSpeed',
            slotName: 'footGreyPutClothSpeed',
            width: 150,
          },
        ],
      },
      {
        title: '半成品刷毛',
        children: [
          {
            title: '机台号',
            dataIndex: 'footProductMachine',
            slotName: 'footProductMachine',
            width: 150,
          },
          {
            title: '机速',
            dataIndex: 'footProductMachineSpeed',
            slotName: 'footProductMachineSpeed',
            width: 150,
          },
          {
            title: '1#毛线刷',
            dataIndex: 'footProductWool1',
            slotName: 'footProductWool1',
            width: 150,
          },
          {
            title: '2#毛线刷',
            dataIndex: 'footProductWool2',
            slotName: 'footProductWool2',
            width: 150,
          },
          {
            title: '大锡林速度',
            dataIndex: 'footProductDaxilinSpeed',
            slotName: 'footProductDaxilinSpeed',
            width: 150,
          },
          {
            title: '大锡林张力',
            dataIndex: 'footProductDaxilinTension',
            slotName: 'footProductDaxilinTension',
            width: 150,
          },
          {
            title: '出布张力',
            dataIndex: 'footProductOutClothTension',
            slotName: 'footProductOutClothTension',
            width: 150,
          },
          {
            title: '进布张力',
            dataIndex: 'footProductInClothTension',
            slotName: 'footProductInClothTension',
            width: 150,
          },
          {
            title: '摆布速度',
            dataIndex: 'footProductPutClothSpeed',
            slotName: 'footProductPutClothSpeed',
            width: 150,
          },
        ],
      },
    ],
  },
]

const tableColumns3 = [
  {
    title: '机台',
    key: 'machine',
    dataIndex: 'machine',
    slotName: 'machine',
    width: 150,
  },
  {
    title: '机速',
    key: 'machineSpeed',
    dataIndex: 'machineSpeed',
    slotName: 'machineSpeed',
    width: 150,
  },
  {
    title: '磨毛工艺',
    key: 'sandCraft',
    dataIndex: 'sandCraft',
    slotName: 'sandCraft',
    width: 150,
  },
  {
    title: '磨毛棍-1',
    children: [
      {
        title: '砂纸型号',
        dataIndex: 'sandModelStick1',
        slotName: 'sandModelStick1',
        width: 150,
      },
      {
        title: '正转/反转',
        dataIndex: 'justBackTurnStick1',
        slotName: 'justBackTurnStick1',
        width: 150,
      },
      {
        title: '压力',
        dataIndex: 'pressureStick1',
        slotName: 'pressureStick1',
        width: 150,
      },
    ],
  },
  {
    title: '磨毛棍-2',
    children: [
      {
        title: '砂纸型号',
        dataIndex: 'sandModelStick2',
        slotName: 'sandModelStick2',
        width: 150,
      },
      {
        title: '正转/反转',
        dataIndex: 'justBackTurnStick2',
        slotName: 'justBackTurnStick2',
        width: 150,
      },
      {
        title: '压力',
        dataIndex: 'pressureStick2',
        slotName: 'pressureStick2',
        width: 150,
      },
    ],
  },
  {
    title: '磨毛棍-3',
    children: [
      {
        title: '砂纸型号',
        dataIndex: 'sandModelStick3',
        slotName: 'sandModelStick3',
        width: 150,
      },
      {
        title: '正转/反转',
        dataIndex: 'justBackTurnStick3',
        slotName: 'justBackTurnStick3',
        width: 150,
      },
      {
        title: '压力',
        dataIndex: 'pressureStick3',
        slotName: 'pressureStick3',
        width: 150,
      },
    ],
  },
  {
    title: '磨毛棍-4',
    children: [
      {
        title: '砂纸型号',
        dataIndex: 'sandModelStick4',
        slotName: 'sandModelStick4',
        width: 150,
      },
      {
        title: '正转/反转',
        dataIndex: 'justBackTurnStick4',
        slotName: 'justBackTurnStick4',
        width: 150,
      },
      {
        title: '压力',
        dataIndex: 'pressureStick4',
        slotName: 'pressureStick4',
        width: 150,
      },
    ],
  },
  {
    title: '磨毛棍-5',
    children: [
      {
        title: '砂纸型号',
        dataIndex: 'sandModelStick5',
        slotName: 'sandModelStick5',
        width: 150,
      },
      {
        title: '正转/反转',
        dataIndex: 'justBackTurnStick5',
        slotName: 'justBackTurnStick5',
        width: 150,
      },
      {
        title: '压力',
        dataIndex: 'pressureStick5',
        slotName: 'pressureStick5',
        width: 150,
      },
    ],
  },
  {
    title: '磨毛棍-6',
    children: [
      {
        title: '砂纸型号',
        dataIndex: 'sandModelStick6',
        slotName: 'sandModelStick6',
        width: 150,
      },
      {
        title: '正转/反转',
        dataIndex: 'justBackTurnStick6',
        slotName: 'justBackTurnStick6',
        width: 150,
      },
      {
        title: '压力',
        dataIndex: 'pressureStick6',
        slotName: 'pressureStick6',
        width: 150,
      },
    ],
  },
]

const tableColumns4 = [
  {
    title: '抓毛工艺',
    children: [
      {
        title: '类型',
        dataIndex: 'scratchType',
        slotName: 'scratchType',
        width: 150,
      },
      {
        title: '第一次抓毛',
        children: [
          {
            title: '机号',
            dataIndex: 'firstMachineNo',
            slotName: 'firstMachineNo',
            width: 150,
          },
          {
            title: '机速',
            dataIndex: 'firstMachineSpeed',
            slotName: 'firstMachineSpeed',
            width: 150,
          },
          {
            title: '抓前布封',
            dataIndex: 'firstGrabFrontBuffon',
            slotName: 'firstGrabFrontBuffon',
            width: 150,
          },
          {
            title: '抓后布封',
            dataIndex: 'firstGrabAfterBuffon',
            slotName: 'firstGrabAfterBuffon',
            width: 150,
          },
          {
            title: '1号',
            dataIndex: 'firstNumber1',
            slotName: 'firstNumber1',
            width: 150,
          },
          {
            title: '2号',
            dataIndex: 'firstNumber2',
            slotName: 'firstNumber2',
            width: 150,
          },
          {
            title: '3号',
            dataIndex: 'firstNumber3',
            slotName: 'firstNumber3',
            width: 150,
          },
          {
            title: '4号',
            dataIndex: 'firstNumber4',
            slotName: 'firstNumber4',
            width: 150,
          },
          {
            title: '5号',
            dataIndex: 'firstNumber5',
            slotName: 'firstNumber5',
            width: 150,
          },
          {
            title: '6号',
            dataIndex: 'firstNumber6',
            slotName: 'firstNumber6',
            width: 150,
          },
          {
            title: '7号',
            dataIndex: 'firstNumber7',
            slotName: 'firstNumber7',
            width: 150,
          },
          {
            title: '8号',
            dataIndex: 'firstNumber8',
            slotName: 'firstNumber8',
            width: 150,
          },
        ],
      },
      {
        title: '第二次抓毛',
        children: [
          {
            title: '机号',
            dataIndex: 'secondMachineNo',
            slotName: 'secondMachineNo',
            width: 150,
          },
          {
            title: '机速',
            dataIndex: 'secondMachineSpeed',
            slotName: 'secondMachineSpeed',
            width: 150,
          },
          {
            title: '抓前布封',
            dataIndex: 'secondGrabFrontBuffon',
            slotName: 'secondGrabFrontBuffon',
            width: 150,
          },
          {
            title: '抓后布封',
            dataIndex: 'secondGrabAfterBuffon',
            slotName: 'secondGrabAfterBuffon',
            width: 150,
          },
          {
            title: '1号',
            dataIndex: 'secondNumber1',
            slotName: 'secondNumber1',
            width: 150,
          },
          {
            title: '2号',
            dataIndex: 'secondNumber2',
            slotName: 'secondNumber2',
            width: 150,
          },
          {
            title: '3号',
            dataIndex: 'secondNumber3',
            slotName: 'secondNumber3',
            width: 150,
          },
          {
            title: '4号',
            dataIndex: 'secondNumber4',
            slotName: 'secondNumber4',
            width: 150,
          },
          {
            title: '5号',
            dataIndex: 'secondNumber5',
            slotName: 'secondNumber5',
            width: 150,
          },
          {
            title: '6号',
            dataIndex: 'secondNumber6',
            slotName: 'secondNumber6',
            width: 150,
          },
          {
            title: '7号',
            dataIndex: 'secondNumber7',
            slotName: 'secondNumber7',
            width: 150,
          },
          {
            title: '8号',
            dataIndex: 'secondNumber8',
            slotName: 'secondNumber8',
            width: 150,
          },
        ],
      },
    ],
  },
]

const tableColumns5 = [
  {
    title: '机号',
    dataIndex: 'machineNo',
    slotName: 'machineNo',
    width: 150,
  },
  {
    title: '起/伏压力',
    dataIndex: 'upDownPressure',
    slotName: 'upDownPressure',
    width: 150,
  },
  {
    title: '伏/起压力',
    dataIndex: 'downUpPressure',
    slotName: 'downUpPressure',
    width: 150,
  },
  {
    title: '布速度',
    dataIndex: 'clothSpeed',
    slotName: 'clothSpeed',
    width: 150,
  },
  {
    title: '总压表',
    dataIndex: 'totalPressureGauge',
    slotName: 'totalPressureGauge',
    width: 150,
  },
  {
    title: '压力表',
    dataIndex: 'pressureGauge',
    slotName: 'pressureGauge',
    width: 150,
  },
]

const tableColumns6 = [
  {
    title: '机号',
    dataIndex: 'machineNo',
    slotName: 'machineNo',
    width: 150,
  },
  {
    title: '剪面/剪底',
    dataIndex: 'cutFaceBack',
    slotName: 'cutFaceBack',
    width: 150,
  },
  {
    title: '布速度',
    dataIndex: 'clothSpeed',
    slotName: 'clothSpeed',
    width: 150,
  },
  {
    title: '张力',
    dataIndex: 'tension',
    slotName: 'tension',
    width: 150,
  },
  {
    title: '剪毛厚度表',
    dataIndex: 'cutHairLand',
    slotName: 'cutHairLand',
    width: 150,
  },
  {
    title: '原力速度',
    dataIndex: 'forceSpeed',
    slotName: 'forceSpeed',
    width: 150,
  },
]

const tableColumns7 = [
  {
    title: '机号',
    dataIndex: 'machineNo',
    slotName: 'machineNo',
    width: 150,
  },
  {
    title: '设定温度',
    dataIndex: 'setHeat',
    slotName: 'setHeat',
    width: 150,
  },
  {
    title: '实际温度',
    dataIndex: 'actualHeat',
    slotName: 'actualHeat',
    width: 150,
  },
  {
    title: '削棉絮时间',
    dataIndex: 'dispelCottonDuration',
    slotName: 'dispelCottonDuration',
    width: 150,
  },
  {
    title: '喷蒸时间',
    dataIndex: 'steamDuration',
    slotName: 'steamDuration',
    width: 150,
  },
  {
    title: '热风时间',
    dataIndex: 'hotwindDuration',
    slotName: 'hotwindDuration',
    width: 150,
  },
  {
    title: '冷风时间',
    dataIndex: 'coldwindDuration',
    slotName: 'coldwindDuration',
    width: 150,
  },
]
let a1 = 0
let a2 = 0
let a3 = 0
let a4 = 0
let a5 = 0
let a6 = 0
let a7 = 0
const addLine = (num: any) => {
  //在这个数组前面添加一行
  if (num == 1) {
    // if (queryData.SpecialManageSinge.length == 1) {
    //   Message.error({
    //     content: '不能超过一行数据',
    //     duration: 5000,
    //   })
    // } else {
    queryData.SpecialManageSinge.unshift({
      id: 'add' + a1++,
      machine: '',
      machineSpeed: '',
      singeCraft: '',
      fabricCaldera1: '',
      fabricCaldera2: '',
      fabricCaldera3: '',
      fabricCaldera4: '',
      fabricBlast1: '',
      fabricBlast2: '',
      fabricBlast3: '',
      fabricBlast4: '',
      footCaldera1: '',
      footCaldera2: '',
      footCaldera3: '',
      footCaldera4: '',
      footBlast1: '',
      footBlast2: '',
      footBlast3: '',
      footBlast4: '',
    })
    // }
  } else if (num == 2) {
    // if (queryData.SpecialManageBristle.length == 1) {
    //   Message.error({
    //     content: '不能超过一行数据',
    //     duration: 5000,
    //   })
    // } else {
    queryData.SpecialManageBristle.unshift({
      id: 'add' + a2++,
      fabricGreyMachine: '',
      fabricGreyMachineSpeed: '',
      fabricGreyWool1: '',
      fabricGreyWool2: '',
      fabricGreyDaxilinSpeed: '',
      fabricGreyDaxilinTension: '',
      fabricGreyOutClothTension: '',
      fabricGreyPutClothSpeed: '',
      fabricProductMachine: '',
      fabricProductMachineSpeed: '',
      fabricProductWool1: '',
      fabricProductWool2: '',
      fabricProductDaxilinSpeed: '',
      fabricProductDaxilinTension: '',
      fabricProductOutClothTension: '',
      fabricProductPutClothSpeed: '',
      footGreyMachine: '',
      footGreyMachineSpeed: '',
      footGreyWool1: '',
      footGreyWool2: '',
      footGreyDaxilinSpeed: '',
      footGreyDaxilinTension: '',
      footGreyOutClothTension: '',
      footGreyPutClothSpeed: '',
      footProductMachine: '',
      footProductMachineSpeed: '',
      footProductWool1: '',
      footProductWool2: '',
      footProductDaxilinSpeed: '',
      footProductDaxilinTension: '',
      footProductOutClothTension: '',
      footProductPutClothSpeed: '',
    })
    // }
  } else if (num == 3) {
    // if (queryData.SpecialManageSand.length == 1) {
    //   Message.error({
    //     content: '不能超过一行数据',
    //     duration: 5000,
    //   })
    // } else {
    queryData.SpecialManageSand.unshift({
      id: 'add' + a3++,
      footGreyMachine: '',
      footGreyMachineSpeed: '',
      footGreyWool1: '',
      footGreyWool2: '',
      footGreyDaxilinSpeed: '',
      footGreyDaxilinTension: '',
      footGreyOutClothTension: '',
      footGreyPutClothSpeed: '',
      footProductMachine: '',
      footProductMachineSpeed: '',
      footProductWool1: '',
      footProductWool2: '',
      footProductDaxilinSpeed: '',
      footProductDaxilinTension: '',
      footProductOutClothTension: '',
      footProductPutClothSpeed: '',
    })
    // }
  } else if (num == 4) {
    queryData.SpecialManageScratch.push({
      id: 'add' + a4++,
      scratchType: '',
      firstMachineNo: '',
      firstMachineSpeed: '',
      firstGrabFrontBuffon: '',
      firstGrabAfterBuffon: '',
      firstNumber1: '',
      firstNumber2: '',
      firstNumber3: '',
      firstNumber4: '',
      firstNumber5: '',
      firstNumber6: '',
      firstNumber7: '',
      firstNumber8: '',
      secondMachineNo: '',
      secondMachineSpeed: '',
      secondGrabFrontBuffon: '',
      secondGrabAfterBuffon: '',
      secondNumber1: '',
      secondNumber2: '',
      secondNumber3: '',
      secondNumber4: '',
      secondNumber5: '',
      secondNumber6: '',
      secondNumber7: '',
      secondNumber8: '',
    })
    for (let i = 0; i <= queryData.SpecialManageScratch.length; i++) {
      if (i > 0) {
        queryData.SpecialManageScratch[i]['disable'] = true
      }
    }
  } else if (num == 5) {
    // if (queryData.SpecialManageComb.length == 1) {
    //   Message.error({
    //     content: '不能超过一行数据',
    //     duration: 5000,
    //   })
    // } else {
    queryData.SpecialManageComb.unshift({
      id: 'add' + a5++,
      machineNo: '',
      upDownPressure: '',
      downUpPressure: '',
      clothSpeed: '',
      totalPressureGauge: '',
      pressureGauge: '',
    })
    // }
  } else if (num == 6) {
    // if (queryData.SpecialManageShear.length == 1) {
    //   Message.error({
    //     content: '不能超过一行数据',
    //     duration: 5000,
    //   })
    // } else {
    queryData.SpecialManageShear.unshift({
      id: 'add' + a6++,
      machineNo: '',
      cutFaceBack: '',
      clothSpeed: '',
      tension: '',
      cutHairLand: '',
      forceSpeed: '',
    })
    // }
  } else if (num == 7) {
    // if (queryData.SpecialManageFluff.length == 1) {
    //   Message.error({
    //     content: '不能超过一行数据',
    //     duration: 5000,
    //   })
    // } else {
    queryData.SpecialManageFluff.unshift({
      id: 'add' + a7++,
      machineNo: '',
      setHeat: '',
      actualHeat: '',
      dispelCottonDuration: '',
      steamDuration: '',
      hotwindDuration: '',
      coldwindDuration: '',
    })
    // }
  }
}
//成分 删除
const delLine = (num: any) => {
  if (num == 1) {
    if (selectedRowKeys1.value.length === 0) {
      Message.error({
        content: '请先勾选',
        duration: 5000,
      })
      return
    }
    queryData['SpecialManageSinge'] = queryData['SpecialManageSinge'].filter(function (o: any) {
      return selectedRowKeys1.value.indexOf(o['id']) === -1
    })
  } else if (num == 2) {
    if (selectedRowKeys2.value.length === 0) {
      Message.error({
        content: '请先勾选',
        duration: 5000,
      })
      return
    }
    queryData['SpecialManageBristle'] = queryData['SpecialManageBristle'].filter(function (
      o: any
    ) {
      return selectedRowKeys2.value.indexOf(o['id']) === -1
    })
  } else if (num == 3) {
    if (selectedRowKeys3.value.length === 0) {
      Message.error({
        content: '请先勾选',
        duration: 5000,
      })
      return
    }
    queryData['SpecialManageSand'] = queryData['SpecialManageSand'].filter(function (o: any) {
      return selectedRowKeys3.value.indexOf(o['id']) === -1
    })
  } else if (num == 4) {
    if (selectedRowKeys4.value.length === 0) {
      Message.error({
        content: '请先勾选',
        duration: 5000,
      })
      return
    }
    queryData['SpecialManageScratch'] = queryData['SpecialManageScratch'].filter(function (
      o: any
    ) {
      return selectedRowKeys4.value.indexOf(o['id']) === -1
    })
  } else if (num == 5) {
    if (selectedRowKeys5.value.length === 0) {
      Message.error({
        content: '请先勾选',
        duration: 5000,
      })
      return
    }
    queryData['SpecialManageComb'] = queryData['SpecialManageComb'].filter(function (o: any) {
      return selectedRowKeys5.value.indexOf(o['id']) === -1
    })
  } else if (num == 6) {
    if (selectedRowKeys6.value.length === 0) {
      Message.error({
        content: '请先勾选',
        duration: 5000,
      })
      return
    }
    queryData['SpecialManageShear'] = queryData['SpecialManageShear'].filter(function (o: any) {
      return selectedRowKeys6.value.indexOf(o['id']) === -1
    })
  } else if (num == 7) {
    if (selectedRowKeys7.value.length === 0) {
      Message.error({
        content: '请先勾选',
        duration: 5000,
      })
      return
    }
    queryData['SpecialManageFluff'] = queryData['SpecialManageFluff'].filter(function (o: any) {
      return selectedRowKeys7.value.indexOf(o['id']) === -1
    })
  }
}
//查询烧毛工艺
function singeingProcess() {
  post({
    url: 'dwWorkShop/SpecialManageSinge/getList',
    data: {
      fabricId: pageData.fabricId,
      specialManageId: pageData.id,
    },
  })
    .then(({ data, code, message }: any) => {
      if (code === 200) {
        queryData['SpecialManageSinge'] = data
      } else {
        Message.error({
          content: message,
          duration: 5000,
        })
      }
    })
    .catch(console.log)
    .finally(() => {
      pageData.pageLoading = false
    })
}
//查询刷毛工艺
function brushingProcess() {
  post({
    url: 'dwWorkShop/SpecialManageBristle/getList',
    data: {
      fabricId: pageData.fabricId,
      specialManageId: pageData.id,
    },
  })
    .then(({ data, code, message }: any) => {
      if (code === 200) {
        queryData['SpecialManageBristle'] = data
      } else {
        Message.error({
          content: message,
          duration: 5000,
        })
      }
    })
    .catch(console.log)
    .finally(() => {
      pageData.pageLoading = false
    })
}
//查询磨毛工艺
function sandingProcess() {
  post({
    url: 'dwWorkShop/SpecialManageSand/getList',
    data: {
      fabricId: pageData.fabricId,
      specialManageId: pageData.id,
    },
  })
    .then(({ data, code, message }: any) => {
      if (code === 200) {
        queryData['SpecialManageSand'] = data
      } else {
        Message.error({
          content: message,
          duration: 5000,
        })
      }
    })
    .catch(console.log)
    .finally(() => {
      pageData.pageLoading = false
    })
}
//查询抓毛工艺
function fleeceProcess() {
  post({
    url: 'dwWorkShop/SpecialManageScratch/getList',
    data: {
      fabricId: pageData.fabricId,
      specialManageId: pageData.id,
    },
  })
    .then(({ data, code, message }: any) => {
      if (code === 200) {
        queryData['SpecialManageScratch'] = data
      } else {
        Message.error({
          content: message,
          duration: 5000,
        })
      }
    })
    .catch(console.log)
    .finally(() => {
      pageData.pageLoading = false
    })
}
//查询梳毛工艺
function cardingProcess() {
  post({
    url: 'dwWorkShop/SpecialManageComb/getList',
    data: {
      fabricId: pageData.fabricId,
      specialManageId: pageData.id,
    },
  })
    .then(({ data, code, message }: any) => {
      if (code === 200) {
        queryData['SpecialManageComb'] = data
      } else {
        Message.error({
          content: message,
          duration: 5000,
        })
      }
    })
    .catch(console.log)
    .finally(() => {
      pageData.pageLoading = false
    })
}
//查询剪毛工艺
function shearingProcess() {
  post({
    url: 'dwWorkShop/SpecialManageShear/getList',
    data: {
      fabricId: pageData.fabricId,
      specialManageId: pageData.id,
    },
  })
    .then(({ data, code, message }: any) => {
      if (code === 200) {
        queryData['SpecialManageShear'] = data
      } else {
        Message.error({
          content: message,
          duration: 5000,
        })
      }
    })
    .catch(console.log)
    .finally(() => {
      pageData.pageLoading = false
    })
}
//查询摇毛工艺
function shakingProcess() {
  post({
    url: 'dwWorkShop/SpecialManageFluff/getList',
    data: {
      fabricId: pageData.fabricId,
      specialManageId: pageData.id,
    },
  })
    .then(({ data, code, message }: any) => {
      if (code === 200) {
        queryData['SpecialManageFluff'] = data
      } else {
        Message.error({
          content: message,
          duration: 5000,
        })
      }
    })
    .catch(console.log)
    .finally(() => {
      pageData.pageLoading = false
    })
}
//查询做布步骤
function clothMakingSteps() {
  post({
    url: 'dwWorkShop/SpecialOther/getList',
    data: {
      fabricId: pageData.fabricId,
      specialManageId: pageData.id,
    },
  })
    .then(({ data, code, message }: any) => {
      if (code === 200) {
        queryData['clothStep'] = data
      } else {
        Message.error({
          content: message,
          duration: 5000,
        })
      }
    })
    .catch(console.log)
    .finally(() => {
      pageData.pageLoading = false
    })
}
//打开打印弹窗
function printTz() {
  //判断是否勾选了数据
  if (gridOption.value.getSelectedRows().length === 0) {
    Message.error('请勾选一条数据')
    return
  }
  if (gridOption.value.getSelectedRows().length > 1) {
    Message.error('请勾选一条数据')
    return
  }
  pageData.id = gridOption.value.getSelectedRows()[0]['id']
  pageData.fabricId = gridOption.value.getSelectedRows()[0]['fabricId']
  singeingProcess()
  brushingProcess()
  sandingProcess()
  fleeceProcess()
  cardingProcess()
  shearingProcess()
  shakingProcess()
  clothMakingSteps()
  visible.value = true
}
const visible = ref(false)

const handleOk = () => {
  printJS({
    printable: 'ht',
    type: 'html',
    targetStyles: ['*'],
  })
  visible.value = false
}
const handleCancel = () => {
  visible.value = false
}
//流转卡号改变
function changeLz(val: any) {
  post({
    url: 'aps/circulatCard/getDropValue',
    data: { circulatCard: val },
  }).then(({ data, code }: any) => {
    if (code === 200) {
      table.handleSuccess(data.list)
      gridOption.value.setRowData(data.list)
      total.value = data.total
    } else {
      Message.error({
        content: '查询失败！',
        duration: 5000,
      })
    }
  })
}
//拿到所有流转卡号
function focusLz() {
  post({
    url: 'aps/circulatCard/getDropValue',
    data: { flowCardCode: '' },
  }).then(({ data, code, message }: any) => {
    if (code === 200) {
      pageData.circulatCardList = data
    } else {
      Message.error({
        content: message,
        duration: 5000,
      })
    }
  })
}
//新增修改 流转卡号改变
// async function changeCode() {
//   const res = await post({
//     url: 'dwWorkShop/SpecialManage/getCirculatCard',
//     data: { circulatCard: queryData.circulatCard },
//   })
//   // console.log(res);
//   if (res.data[0]) {
//     for (let key in res.data[0]) {
//       queryData[key] = res.data[0][key]
//     }
//   } else {
//     Message.error({
//       content: '流转卡号有误，请重新输入',
//       duration: 5000,
//     })
//     //重置表单
//     for (let key in queryData) {
//       queryData[key] = ''
//     }
//   }
// }
const changeCode = () => {
  post({
    url: "dwWorkShop/SpecialManage/getCirculatCard",
    data: { circulatCard: queryData.circulatCard }
  }).then(({ data, code }: any) => {
    if (code === 200) {
      function isEmptyObject(obj: any) {
        for (var key in obj) {
          if (obj.hasOwnProperty(key)) {
            return false;
          }
        }
        return true;
      }
      if (isEmptyObject(data.title)) {
        Message.error({
          content: '流转卡号有误，请重新输入',
          duration: 5000,
        })
        for (let key in queryData) {
          queryData[key] = ''
        }
        queryData.SpecialManageSinge = []
        queryData.SpecialManageBristle = []
        queryData.SpecialManageSand = []
        queryData.SpecialManageScratch = []
        queryData.SpecialManageComb = []
        queryData.SpecialManageShear = []
        queryData.SpecialManageFluff = []
      } else {
        for (let key in data.title) {
          queryData[key] = data.title[key]
        }
        if (data.singe != undefined) {
          data.singe.forEach((item: any) => {
            item.id = null
          })
          queryData.SpecialManageSinge = data.singe
        }
        if (data.bristle != undefined) {
          data.bristle.forEach((item: any) => {
            item.id = null
          })
          queryData.SpecialManageBristle = data.bristle
        }
        if (data.sand != undefined) {
          data.sand.forEach((item: any) => {
            item.id = null
          })
          queryData.SpecialManageSand = data.sand
        }
        if (data.scratch != undefined) {
          data.scratch.forEach((item: any) => {
            item.id = null
          })
          queryData.SpecialManageScratch = data.scratch
        }
        if (data.comb != undefined) {
          data.comb.forEach((item: any) => {
            item.id = null
          })
          queryData.SpecialManageComb = data.comb
        }
        if (data.shear != undefined) {
          data.shear.forEach((item: any) => {
            item.id = null
          })
          queryData.SpecialManageShear = data.shear
        }
        if (data.fluff != undefined) {
          data.fluff.forEach((item: any) => {
            item.id = null
          })
          queryData.SpecialManageFluff = data.fluff
        }

      }

      // if(data == ''){

      //           } else {
      //               Message.error({
      //   content: '流转卡号有误，请重新输入',
      //   duration: 5000,
      // })
      //             }
    } else {
      Message.error({
        content: "查询失败！",
        duration: 5000,
      });

    }
  });
}
// 导出
let exportExcel = () => {
  //表头中文名
  // const titleArr = [
  //   '公司',
  //   '验部员工',
  //   '工号',
  //   '部门',
  //   '验布班长',
  //   '当天次布重量',
  //   '当天开机重量',
  //   '当天次布率',
  //   '当天次布米数',
  //   '本月累计次布率',
  //   '本月累计次布米数',
  //   '本月累计烂针转数',
  //   '日期',
  // ]
  // EXPORTEXEL(pageData.dataList, '原料问题开剪次布记录', titleArr, '1')
  EXELTABLE(tableColumns, pageData.dataList, '特整工艺管理列表')
}
//拿到单号
function getRecordCode() {
  post({
    url: 'dwWorkShop/SpecialManage/getCodeGenerate',
    data: {},
  }).then(({ code, data }: any) => {
    if (code == 200) {
      queryData.recordCode = data
    } else {
      Message.error({
        content: '查询失败',
        duration: 5000,
      })
    }
  })
}
</script>
<style lang="less" scoped>
.search-form {
  margin-top: 10px;
}

.fromTitle {
  width: 100%;
  background-color: white;
  padding: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  justify-content: space-between;

  form {
    width: 50% !important;
    margin-top: 10px !important;
  }

  &>.my-header {
    width: 100%;
    padding: 10px;
    padding-top: 0;
    background-color: white;

    min-height: 10%;

    &>.my-tool-bar {
      width: 100%;
      text-align: right;
      margin-top: 50px;
    }
  }
}

.fromTitle1 {
  margin-left: 50px;
  margin-top: 60px;
}

:deep(.ag-cell) {
  border-right: 1px solid #dde2eb;
}

:deep(.ag-header-cell) {
  border-right: 1px solid #dde2eb;
}

:deep(.arco-space) {
  width: 450px !important;
}

.table tr,
.table td {
  border: 1px solid #3e3e3e;
  text-align: center;
}
</style>
